<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
	<meta name="description" content="" />
	<meta name="keywords" content="" />

  	<?php $this->headTitle()->setPostfix(' - YesUp Accounts'); ?>
	<?php echo $this->headTitle(); ?>
	
	<script type="text/javascript" src="/js/jquery-1.4.2.min.js"></script>
	<script type="text/javascript" src="/js/jquery-ui-1.8.6.custom.min.js"></script>
	
	<link href="/css/ui/jquery-ui-1.8.6.custom.css" rel="stylesheet" media="all" />
	<link href="/css/themes/base/jquery.ui.all.css" rel="stylesheet" media="all" />
	<link href="/css/styles.css" rel="stylesheet" media="all" />
	
</head>

<body id="demos">
<!--[if IE 5]><div id="ie5" class="ie"><![endif]-->
<!--[if IE 6]><div id="ie6" class="ie"><![endif]-->
<!--[if IE 7]><div id="ie7" class="ie"><![endif]-->
<div id="wrapper">
	<div id="content-wrapper">
		<div id="content">
		
		<div class="content-top">
			<div id="demo-header">
				<!-- div class=left><h2 style="cursor:pointer;" onclick="location='/';">YesUp Account</h2></div> -->
				<div class=left><img src='/images/yesup_logo.png' style="margin-top:10px;cursor:pointer;" onclick="location='/';"></div>
				
				<div class="top-nav">
<?php if (empty($this->user_id)) : ?>
					<span><a href="/">Home</a></span>
<?php else: ?>					
					<span><a href="/client">Dashboard</a></span>
					<span><a href="/client/profile">Profile</a></span>
					<span><a href="/client/settings">Settings</a></span>
<?php 
$ip = $_SERVER['REMOTE_ADDR'];
if (($ip=='70.50.227.211' or $ip=='199.21.151.11' or $ip=='127.0.0.1')){
	echo '<span><a href="/client/networks">Networks</a></span>';
}
if ($this->user_role=='manager'){
	echo '<span><a href="/client/manager">Manager</a></span>';	
}
?>					
					
<?php endif ?>					
				</div>									

<?php if (!empty($this->user_id)) : ?>
				
<?php if (count($this->user_accounts)>1) : ?>
				<div class=right style="padding:29px 10px 0 0;"><a href="/login/logout" class="btn"><span class="ui-title">Logout</span></a></div>
				<div class=right style="padding:29px 20px 0 0;">
				<span class="ui-title"><a href="/client/settings/link-account" style="font-size:12px;color:#666;padding:3px 10px;float:left">Accounts:</a></span>
				<select name="link_account" id="link_account" onchange=" var selected = $('#link_account').val(); location='/client/index/to-account/id/'+selected;">
				<?php
					foreach($this->user_accounts as $key => $value ){
						if ($key==$this->user_id)
							echo '<option value="'.$key.'" selected>'.$value.'</option>';
						else
							echo '<option value="'.$key.'">'.$value.'</option>';
					} 
				?>
				</select>
				</div>
<?php else: ?>								
				<div class=right style="padding:22px 10px 0 0;"><a href="/login/logout" class="btn"><span class="ui-title">Logout</span></a></div>
				<div class=right style="padding:29px 20px 0 0;"><a href="/client/profile"><span class="ui-title"><?php echo $this->user_name; ?></span></a></div>
<?php endif ?>	
												
<?php else: ?>
				<div class=right style="padding:22px 10px 0 0;"><a href="/signup" class="btn"><span class="ui-title">Sign Up</span></a></div>
				<div class=right style="padding:22px 10px 0 0;"><a href="/login/box" class="btn"><span class="ui-title">Login</span></a></div>
<?php endif ?>					
				<div class="clearfix"></div>			
			</div>		
		</div>

		<div class="content">

		<div class="main-content">
		
			<?php echo $this->layout()->content;?>

		</div>
		
		</div>
		
		</div>
		
		<div class="clearfix"></div>
			<div id="footer">
				<a href="/" >Home</a> | 
				<a href="/client" >Client</a> | 
				<a href="http://www.yesup.com/about-yesup" >About Us</a> | 
			</div>
		
			<div id="copyright">
				<?php echo $this->translate("Powered by"); ?> <a href="http://www.yesup.com" >YesUp.com</a>
			</div>
		</div>
		
	</div>


</div>
</body>
</html>
<!--  script type="text/javascript" src="/infobar.php"></script-->